<template>
  <div class="info">
    <img src="../../assets/gou.png" alt />
    <span>{{title}}</span>
    <!-- 取消喜欢成功 -->
    <!-- 已添加到我喜欢的音乐 -->
  </div>
</template>
<script>
export default {
  data() {
    return {
      title: "已添加到我喜欢的音乐",
      show: true
    };
  },
  mounted() {
    document.body.appendChild(this.$el);
    setTimeout(() => {
      document.body.removeChild(this.$el);
      this.$destroy();
    }, 2000);
  }
};
</script>
<style lang="less" scoped>
.info {
  display: flex;
  height: 80px;
  width: 250px;
  background-color: black;
  opacity: 0.8;
  color: white;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: -20%;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  animation: fadeInDown;
  animation-duration: 2s;
  img {
    width: 30px;
    height: 30px;
  }
  span {
    font-size: 18px;
    padding: 10px;
  }
}
@-webkit-keyframes fadeInDown {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
</style>